#include <system.h>


void moss_main()
{
 // Begin system initialization
 mmgr_install();
 //gdt_install();
 vga_init();
 idt_install();
 irq_install();
 asm volatile("sti");
 timer_install();
 keyboard_install();
#if _Verbose_Init_
 vga_settextcolor(0xF,0x2);
 vga_printstr("Moss initialized.\n");
 vga_settextcolor(0xF,0x0);
#endif
 vga_printstr("Moss kernel ");
 vga_printstr(_Kernel_Version_);
 vga_printstr("\nBuilt on ");
 vga_printstr(__DATE__);
 vga_printstr(" at ");
 vga_printstr(__TIME__);
 vga_printstr("\n");
 // End system initialization
 
 // Launch the system boot program
 

 for(;;);
}

unsigned char inportb(unsigned short _port)
{
 unsigned char rv;
 asm volatile("inb %1, %0" : "=a" (rv) : "dN" (_port));
 return rv;
}

void outportb(unsigned short _port, unsigned char _data)
{
 asm volatile("outb %1, %0" : : "dN" (_port), "a" (_data));
}